<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require '../vendor/autoload.php';

use Payment\NotifyContext;
use Payment\Common\PayException;
use Payment\Config;
use FlowCharge\UploadCallback;
$wxconfig = require_once __DIR__ . '/config/wxconfig.php';
$notify = new NotifyContext();

$callback = new UploadCallback();

try {


    // 微信回调
    $notify->initNotify(Config::WEIXIN, $wxconfig);

    $ret = $notify->notify($callback);
} catch (PayException $e) {
    echo $e->errorMessage();exit;
}
